<template>
  <div class="page_prize_list">
    <div v-show="prizeList.length"
         class="prize_container">
      <div class="prize_container_title">奖品清单</div>
      <div v-for="(item,index) in prizeList"
           :key="index"
           class="prize_item">
        <div class="prize_item_num">{{item.num}}</div>
        <div class="prize_item_content flex align-center ">
          <img :src="item.img"
               alt="">
          <div class="prize_item_right">
            <p class="prize_item_name">{{item.name}}</p>
            <p class="prize_item_desc text-line-2">{{item.desc}}</p>
          </div>
        </div>
      </div>
    </div>
    <p v-show="prizeList.length"
       class="disclaimers">
      商品图片仅供参考，最终奖励以发放的实物为准。
    </p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      prizeList: []
    }
  },
  created() {
    this.getPrizeList()
  },
  methods: {
    getPrizeList() {
      this.$api.apiPrizeList().then(res => {
        console.log('奖品清单', res);
        this.prizeList = res.data.list
      })
    }
  }
}
</script>

<style lang="scss" >
.page_prize_list {
  min-height: 100vh;
  background-color: #ffe4ce;
  padding: 57px 20px 0 20px;
  .prize_container {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #000000;
    position: relative;
    padding-top: 70px;
    .prize_container_title {
      font-size: 26px;
      font-family: PingFang-SC-Heavy, PingFang-SC;
      font-weight: 800;
      color: #492105;
      line-height: 58px;
      background-image: url("~@/assets/img/prize_list.png");
      background-size: 100% 100%;
      width: 246px;
      height: 58px;
      text-align: center;
      position: absolute;
      left: 50%;
      top: -29px;
      margin-left: -123px;
    }
    .prize_item {
      .prize_item_num {
        width: 168px;
        height: 54px;
        line-height: 54px;
        background: #ffe4ce;
        border: 1px solid #000000;
        border-left: none;
        font-size: 26px;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 700;
        color: #492105;
        text-align: center;
      }
      .prize_item_content {
        & > img {
          width: 140px;
          height: 140px;
          margin-left: 40px;
          margin-right: 26px;
        }
        .prize_item_right {
          margin: 30px 20px 40px 0;
          .prize_item_name {
            font-size: 28px;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 700;
            color: #333333;
            line-height: 40px;
            margin-bottom: 19px;
          }
          .prize_item_desc {
            font-size: 28px;
            font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #666666;
            line-height: 40px;
          }
        }
      }
    }
  }
  .disclaimers {
    font-size: 24px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: rgba(73, 33, 5, 0.45);
    line-height: 33px;
    margin-top: 20px;
    padding-bottom: 20px;
    text-align: center;
  }
}
</style>